package com.gao.controller.config;

import com.gao.util.ResultVO;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author gao
 * @time 2022/01/24 21:25:38
 */
@ControllerAdvice
public class MyControllerAdvice {
    @ExceptionHandler(Exception.class)
    public ResultVO f1(Exception e) {
        // for debug
        e.printStackTrace();
        return ResultVO.failure(e.toString());
    }
}
